package com.shanghai.shanghaielectric.communicate;

/**
 * 设备运行状态   枚举类
 * @author ZDD
 *
 */
public enum VoltagePhaseSequence {
		
		POSITIVE(0,"正序"),
		NEGATIVE(1,"负序");
		
		public int code;
		public String msg;

		VoltagePhaseSequence(int code, String msg) {
			this.code = code;
			this.msg = msg;
		}
		
		public static VoltagePhaseSequence getEnum(int code) {
			for (VoltagePhaseSequence resultCode : values()) {
				if (resultCode.code == code) {
					return resultCode;
				}
			}
			return POSITIVE;
		}
	}
